<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <link href="./lib/bootstrap/css/bootstrap.css" rel="stylesheet">
    <link rel="stylesheet" href="./css/public.css">
    <link rel="stylesheet" href="./css/index.css">
    <link rel="stylesheet" href="./css/xiangqing.css">
</head>

<body>
    <header id="back">
        <a class="logo" href="javascript:;">
         <img src="./images/header_logo.png" alt=""> 
       </a>
        <input type="text" placeholder="国内折扣">
        <a href="http://m.manmanbuy.com/?o=download">
            <img src="./images/header_app.png" alt="">
        </a>
    </header>

    <!-- 详情 -->
    <div class="xiangqing">
     
    </div>

    <!-- 前往购买 -->
    <a href="javascript:;">
        <input type="buttom" class="buy" value="前往购买">
    </a>

    <!-- 底部 -->
    <div class="foot">
        <div class="ppph" style="margin-bottom:80px">
            <span>品牌排行</span>
            <a href="javascript:;">
                    <img src="./images/more.png" alt="">
                </a>
        </div>
        <div class="prompt" style="margin-bottom:50px">
            <a href="javascript:;" class="login col-xs-4">登录</a>
            <a href="javascript:;" class="zhuce col-xs-4">注册</a>
            <a href="#back" class="col-xs-4">
                    <img src="./images/top.jpg" alt="">
                    返回顶部
                </a>
        </div>
        <div class="downLoad" style="margin-bottom:-30px">
            <a href="javascript:;">手机APP下载</a>
            <span>慢慢买手机版-掌上比价平台</span>
            <p>m.manmanbuy.com</p>
        </div>
    </div>

    <!-- 固定图标 -->
    <div class="fix">
        <a href="http://m.manmanbuy.com/app.html?type=right&value=wap">
            <img src="./images/固定图标.png" alt="">
            <i class=""></i>
        </a>
    </div>

    <script type="text/html" id="xqTemp">
       {{each data value}}
       <h3>{{@value.productName}}</h3>
       <p>{{@value.productPrice}}</p>
       <p>{{@value.productFrom}}&nbsp;
           {{@value.productTime}}&nbsp;
           {{@value.productTips}}
        </p>
       <div class="info">
           简介:{{@value.productInfo}}
       </div>
       {{@value.productImg}}
       <!-- {{@value.productComment}} -->
       {{/each}}
    </script>
    <script src="./lib/arttemplate/template-web.js"></script>
    <script src="./lib/zepto/zepto.js"></script>
    <script src="./lib/jquery/jquery.min.js"></script>
    <script src="./js/index.js"></script>
    <script src="./lib/bootstrap/js/bootstrap.min.js"></script>
</body>

</html>

<script>
    var temp = window.location.search;
    var id = temp.slice(4);
    $.ajax({
        type: 'get',
        url: 'http://193.112.55.79:9090/api/getdiscountproduct',
        data: { productid: id },
        success: function (res) {
            console.log(res);
            var html = template('xqTemp',{data:res.result});
            $('.xiangqing').html(html);
        }
    })

</script>